package com.yykj.user.center.server.repository;

import com.yykj.user.center.server.model.Inspect;
import com.yykj.user.center.server.model.Patient;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author chenl
 * @version 1.0
 * @date 2021/10/20 22:24
 */
@Repository
public interface InspectRepository extends JpaRepository<Inspect, String>, JpaSpecificationExecutor<Inspect> {

    List<Inspect> findAllByStateAndVisitTimeBefore(Integer state, LocalDateTime now);

    List<Inspect> findAllByStateIn(int[] states);

}
